export class FileEntity {
    fileName: string
    filePath: string
    isDirectory: boolean
    isDisk: boolean
    readonly isFile: boolean
    tagIds: string[] = []
    size:number
    lastUpdateTime:Date
    createTime:Date

    constructor(fileName: string, filePath: string, isDirectory: boolean, isDisk: boolean) {
        this.fileName = fileName;
        this.filePath = filePath;
        this.isDirectory = isDirectory;
        this.isDisk = isDisk;
        this.isFile = !this.isDisk && !this.isDirectory;
    }

    public static getParentFolderPath(file: FileEntity) {
        const strings = file.filePath.split("/");
        strings.splice(-1, 1)
        return strings.join("/")
    }
}